/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Presentacion;

import Aplic.TPFinal;
import Negocio.Empresa;
import java.awt.Dimension;
import java.beans.PropertyVetoException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author robert
 */
public class FrmMain extends javax.swing.JFrame {

    private Empresa unaEmpresa;// = new Empresa();
    //private TPFinal controladora = new TPFinal();

    /**
     * Creates new form FrmMain
     */
    public FrmMain() {
        initComponents();
        //this.unaEmpresa = controladora.obtenerEmpresa();
    }

    public FrmMain(Empresa unaEmpresa) {
        initComponents();
        //this.centrar();
        this.unaEmpresa = unaEmpresa;
    }

    public void centrar() {
        Dimension pantalla = this.getToolkit().getScreenSize();
        this.setLocation(pantalla.width / 2 - this.getWidth() / 2, pantalla.height / 2 - this.getHeight() / 2);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenu3 = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        escritorio = new javax.swing.JDesktopPane();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenuABM = new javax.swing.JMenu();
        MenuPlantaciones = new javax.swing.JMenuItem();
        jMenuItem1 = new javax.swing.JMenuItem();
        MenuAplicaciones = new javax.swing.JMenuItem();
        MenuDeposito = new javax.swing.JMenuItem();
        JMInsumos = new javax.swing.JMenu();
        MenuTipoInsumo = new javax.swing.JMenuItem();
        MenuInsumos = new javax.swing.JMenuItem();
        JMBienes = new javax.swing.JMenu();
        MenuMantenimientos = new javax.swing.JMenuItem();
        MnuVehiculos = new javax.swing.JMenuItem();
        JMEntidades = new javax.swing.JMenu();
        MCliente = new javax.swing.JMenuItem();
        MenuProveedores = new javax.swing.JMenuItem();
        JMPersonal = new javax.swing.JMenu();
        MenuTipoRol = new javax.swing.JMenuItem();
        MenuPersonal = new javax.swing.JMenuItem();
        MenuRoles = new javax.swing.JMenuItem();
        MenuRegistroHorario = new javax.swing.JMenuItem();
        MenuPlanillaHorarios = new javax.swing.JMenuItem();
        Equipamiento = new javax.swing.JMenuItem();
        jMenuMovimientos = new javax.swing.JMenu();
        jMenuIngreso = new javax.swing.JMenuItem();
        jMenuProceso = new javax.swing.JMenuItem();
        jMenuSalida = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuTrazabilidad = new javax.swing.JMenuItem();
        jMenuEstadistica = new javax.swing.JMenuItem();
        jMenuDensidad = new javax.swing.JMenuItem();

        jMenu3.setText("jMenu3");

        jMenuItem3.setText("jMenuItem3");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Secadero");
        setMinimumSize(new java.awt.Dimension(800, 600));
        setPreferredSize(new java.awt.Dimension(800, 600));
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        escritorio.setPreferredSize(new java.awt.Dimension(1024, 700));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Docs/148927_yerba-mate.jpg"))); // NOI18N
        jLabel1.setText("jLabel1");

        javax.swing.GroupLayout escritorioLayout = new javax.swing.GroupLayout(escritorio);
        escritorio.setLayout(escritorioLayout);
        escritorioLayout.setHorizontalGroup(
            escritorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(escritorioLayout.createSequentialGroup()
                .addGap(196, 196, 196)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 489, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(339, Short.MAX_VALUE))
        );
        escritorioLayout.setVerticalGroup(
            escritorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, escritorioLayout.createSequentialGroup()
                .addContainerGap(234, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addGap(167, 167, 167))
        );
        escritorio.setLayer(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jMenuABM.setText("Ubicaciones");
        jMenuABM.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuABMActionPerformed(evt);
            }
        });

        MenuPlantaciones.setText("Plantaciones");
        MenuPlantaciones.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuPlantacionesActionPerformed(evt);
            }
        });
        jMenuABM.add(MenuPlantaciones);

        jMenuItem1.setText("Parcelas");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenuABM.add(jMenuItem1);

        MenuAplicaciones.setText("Aplicaciones");
        MenuAplicaciones.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuAplicacionesActionPerformed(evt);
            }
        });
        jMenuABM.add(MenuAplicaciones);

        MenuDeposito.setText("Depositos");
        MenuDeposito.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuDepositoActionPerformed(evt);
            }
        });
        jMenuABM.add(MenuDeposito);

        jMenuBar1.add(jMenuABM);

        JMInsumos.setText("Insumos");
        JMInsumos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JMInsumosActionPerformed(evt);
            }
        });

        MenuTipoInsumo.setText("Tipo De Insumo");
        MenuTipoInsumo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuTipoInsumoActionPerformed(evt);
            }
        });
        JMInsumos.add(MenuTipoInsumo);

        MenuInsumos.setText("Insumos");
        MenuInsumos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuInsumosActionPerformed(evt);
            }
        });
        JMInsumos.add(MenuInsumos);

        jMenuBar1.add(JMInsumos);

        JMBienes.setText("Bienes");

        MenuMantenimientos.setText("Mantenimientos");
        MenuMantenimientos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuMantenimientosActionPerformed(evt);
            }
        });
        JMBienes.add(MenuMantenimientos);

        MnuVehiculos.setText("Vehículos");
        MnuVehiculos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MnuVehiculosActionPerformed(evt);
            }
        });
        JMBienes.add(MnuVehiculos);

        jMenuBar1.add(JMBienes);

        JMEntidades.setText("Entidades Comerciales");

        MCliente.setText("Clientes");
        MCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MClienteActionPerformed(evt);
            }
        });
        JMEntidades.add(MCliente);

        MenuProveedores.setText("Proveedores");
        MenuProveedores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuProveedoresActionPerformed(evt);
            }
        });
        JMEntidades.add(MenuProveedores);

        jMenuBar1.add(JMEntidades);

        JMPersonal.setText("Personal");
        JMPersonal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JMPersonalActionPerformed(evt);
            }
        });

        MenuTipoRol.setText("Tipo de Rol");
        MenuTipoRol.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuTipoRolActionPerformed(evt);
            }
        });
        JMPersonal.add(MenuTipoRol);

        MenuPersonal.setText("Empleados");
        MenuPersonal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuPersonalActionPerformed(evt);
            }
        });
        JMPersonal.add(MenuPersonal);

        MenuRoles.setText("Roles");
        MenuRoles.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuRolesActionPerformed(evt);
            }
        });
        JMPersonal.add(MenuRoles);

        MenuRegistroHorario.setText("Registro Horario");
        MenuRegistroHorario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuRegistroHorarioActionPerformed(evt);
            }
        });
        JMPersonal.add(MenuRegistroHorario);

        MenuPlanillaHorarios.setText("Planilla Horarios");
        MenuPlanillaHorarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuPlanillaHorariosActionPerformed(evt);
            }
        });
        JMPersonal.add(MenuPlanillaHorarios);

        Equipamiento.setText("Equipamiento");
        Equipamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                EquipamientoActionPerformed(evt);
            }
        });
        JMPersonal.add(Equipamiento);

        jMenuBar1.add(JMPersonal);

        jMenuMovimientos.setText("Movimientos");

        jMenuIngreso.setText("Ingreso");
        jMenuIngreso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuIngresoActionPerformed(evt);
            }
        });
        jMenuMovimientos.add(jMenuIngreso);

        jMenuProceso.setText("Proceso");
        jMenuProceso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuProcesoActionPerformed(evt);
            }
        });
        jMenuMovimientos.add(jMenuProceso);

        jMenuSalida.setText("Salida");
        jMenuSalida.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuSalidaActionPerformed(evt);
            }
        });
        jMenuMovimientos.add(jMenuSalida);

        jMenuBar1.add(jMenuMovimientos);

        jMenu2.setText("Información");

        jMenuTrazabilidad.setText("Trazabilidad");
        jMenuTrazabilidad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuTrazabilidadActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuTrazabilidad);

        jMenuEstadistica.setText("Estadísticas");
        jMenuEstadistica.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuEstadisticaActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuEstadistica);

        jMenuDensidad.setText("Densidad Producción");
        jMenuDensidad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuDensidadActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuDensidad);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(escritorio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(escritorio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        // TODO add your handling code here:
    }//GEN-LAST:event_formWindowClosing

    private void jMenuABMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuABMActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuABMActionPerformed

    private void MnuVehiculosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MnuVehiculosActionPerformed
        // TODO add your handling code here:
        DlgVehiculo ventanaVehiculo = new DlgVehiculo(this, true, this.unaEmpresa);
        ventanaVehiculo.setLocationRelativeTo(this);
        ventanaVehiculo.setVisible(true);
    }//GEN-LAST:event_MnuVehiculosActionPerformed

    private void MClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MClienteActionPerformed
        // TODO add your handling code here:
        FrmCliente ventanaCliente = new FrmCliente(this, true, this.unaEmpresa);
        ventanaCliente.setLocationRelativeTo(this);
        ventanaCliente.setVisible(true);

    }//GEN-LAST:event_MClienteActionPerformed

    private void MenuProveedoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuProveedoresActionPerformed
        // TODO add your handling code here:
        FrmProveedor ventana = new FrmProveedor(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_MenuProveedoresActionPerformed

    private void MenuMantenimientosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuMantenimientosActionPerformed
        // TODO add your handling code here:
        FrmMantenimiento ventana = new FrmMantenimiento(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_MenuMantenimientosActionPerformed

    private void MenuInsumosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuInsumosActionPerformed
        // TODO add your handling code here:
        FrmInsumo ventana = new FrmInsumo(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_MenuInsumosActionPerformed

    private void EquipamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_EquipamientoActionPerformed
        // TODO add your handling code here:
        FrmEquipamiento ventana = new FrmEquipamiento(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);

    }//GEN-LAST:event_EquipamientoActionPerformed

    private void MenuTipoInsumoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuTipoInsumoActionPerformed
        // TODO add your handling code here:
        FrmTipoInsumo ventana = new FrmTipoInsumo(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_MenuTipoInsumoActionPerformed

    private void MenuPlantacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuPlantacionesActionPerformed
        // TODO add your handling code here:
        FrmPlantacion ventana = new FrmPlantacion(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_MenuPlantacionesActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        FrmParcela ventana = new FrmParcela(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void MenuDepositoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuDepositoActionPerformed
        // TODO add your handling code here:
        FrmDeposito ventana = new FrmDeposito(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_MenuDepositoActionPerformed

    private void MenuAplicacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuAplicacionesActionPerformed
        // TODO add your handling code here:
        FrmAplicacion ventana = new FrmAplicacion(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_MenuAplicacionesActionPerformed

    private void MenuPlanillaActionPerformed(java.awt.event.MouseEvent evt) {
        FrmPlanillaHorarios ventana = new FrmPlanillaHorarios(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);

    }

    private void jMenuProcesarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMenuIngresoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuIngresoActionPerformed
        // TODO add your handling code here:
        DlgIngreso ventana = new DlgIngreso(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_jMenuIngresoActionPerformed

    private void jMenuProcesoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuProcesoActionPerformed
        // TODO add your handling code here:
        DlgProcesoYerba ventana = new DlgProcesoYerba(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_jMenuProcesoActionPerformed

    private void jMenuSalidaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuSalidaActionPerformed
        // TODO add your handling code here:
        JDialogSalida ventana = new JDialogSalida(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_jMenuSalidaActionPerformed

    private void jMenuTrazabilidadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuTrazabilidadActionPerformed
        // TODO add your handling code here:
        DlgTrazabilidad ventana = new DlgTrazabilidad(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_jMenuTrazabilidadActionPerformed

    private void jMenuEstadisticaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuEstadisticaActionPerformed
        // TODO add your handling code here:
        DlgEstadisticas ventana = new DlgEstadisticas(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_jMenuEstadisticaActionPerformed

    private void jMenuDensidadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuDensidadActionPerformed
        // TODO add your handling code here:
        DlgDensidad ventana = new DlgDensidad(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_jMenuDensidadActionPerformed

    private void MenuTipoRolActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuTipoRolActionPerformed
        // TODO add your handling code here:
        FrmTipoRol ventanaTipoRol = new FrmTipoRol(this, true, this.unaEmpresa);
        ventanaTipoRol.setLocationRelativeTo(this);        
        ventanaTipoRol.setVisible(true);
    }//GEN-LAST:event_MenuTipoRolActionPerformed

    private void JMPersonalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JMPersonalActionPerformed
        // TODO add your handling code here:
        FrmPersonal ventanaPersonal = new FrmPersonal(this, true, this.unaEmpresa);
        ventanaPersonal.setLocationRelativeTo(this);
        ventanaPersonal.setVisible(true);
    }//GEN-LAST:event_JMPersonalActionPerformed

    private void MenuRolesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuRolesActionPerformed
        // TODO add your handling code here:
        FrmRoles ventanaPersonal = new FrmRoles(this, true, this.unaEmpresa);
        ventanaPersonal.setLocationRelativeTo(this);
        ventanaPersonal.setVisible(true);
    }//GEN-LAST:event_MenuRolesActionPerformed

    private void MenuRegistroHorarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuRegistroHorarioActionPerformed
        // TODO add your handling code here:
        FrmRegistroHorario ventana = new FrmRegistroHorario(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_MenuRegistroHorarioActionPerformed

    private void MenuPersonalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuPersonalActionPerformed
        // TODO add your handling code here:
        FrmPersonal ventana = new FrmPersonal(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_MenuPersonalActionPerformed

    private void JMInsumosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JMInsumosActionPerformed
        // TODO add your handling code here:
        FrmTipoInsumo ventana = new FrmTipoInsumo(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
    }//GEN-LAST:event_JMInsumosActionPerformed

    private void MenuPlanillaHorariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuPlanillaHorariosActionPerformed
        // TODO add your handling code here:
        FrmPlanillaHorarios ventana = new FrmPlanillaHorarios(this, true, this.unaEmpresa);
        ventana.setLocationRelativeTo(this);
        ventana.setVisible(true);
        
    }//GEN-LAST:event_MenuPlanillaHorariosActionPerformed

    /**
     * @param args the command line arguments
     */
    public void mainMetodo() {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrmMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                //new FrmMain().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem Equipamiento;
    private javax.swing.JMenu JMBienes;
    private javax.swing.JMenu JMEntidades;
    private javax.swing.JMenu JMInsumos;
    private javax.swing.JMenu JMPersonal;
    private javax.swing.JMenuItem MCliente;
    private javax.swing.JMenuItem MenuAplicaciones;
    private javax.swing.JMenuItem MenuDeposito;
    private javax.swing.JMenuItem MenuInsumos;
    private javax.swing.JMenuItem MenuMantenimientos;
    private javax.swing.JMenuItem MenuPersonal;
    private javax.swing.JMenuItem MenuPlanillaHorarios;
    private javax.swing.JMenuItem MenuPlantaciones;
    private javax.swing.JMenuItem MenuProveedores;
    private javax.swing.JMenuItem MenuRegistroHorario;
    private javax.swing.JMenuItem MenuRoles;
    private javax.swing.JMenuItem MenuTipoInsumo;
    private javax.swing.JMenuItem MenuTipoRol;
    private javax.swing.JMenuItem MnuVehiculos;
    private javax.swing.JDesktopPane escritorio;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenuABM;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuDensidad;
    private javax.swing.JMenuItem jMenuEstadistica;
    private javax.swing.JMenuItem jMenuIngreso;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenu jMenuMovimientos;
    private javax.swing.JMenuItem jMenuProceso;
    private javax.swing.JMenuItem jMenuSalida;
    private javax.swing.JMenuItem jMenuTrazabilidad;
    // End of variables declaration//GEN-END:variables
}
